package com.hfy.admin.config;

import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.TimeUnit;

/**
 * @ author 韩
 * time: 2024/12/18 14:22
 */

@Configuration
public class CaffeineConfig {
    @Bean
    public Cache<String, Integer> caffeineCache() {
        return Caffeine.newBuilder()
                .maximumSize(100)
                .build();
    }
}